//
//  BaseApiClient.m
//  Echo
//
//  Created by Liao on 13-11-20.
//  Copyright (c) 2013年 LCheng. All rights reserved.
//

#import "BaseApiClient.h"

@implementation BaseApiClient

+ (instancetype)sharedClient {
    static BaseApiClient *_sharedClient = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedClient = [[BaseApiClient alloc] initWithBaseURL:[NSURL URLWithString:DATA_API_BASE_URL]];
        _sharedClient.requestSerializer = [AFJSONRequestSerializer serializer];
        [_sharedClient.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];
    });
    
    return _sharedClient;
}

@end
